/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2022-02-16 06:13:33
 * @LastEditors: GGB
 * @LastEditTime: 2022-02-16 06:56:14
 */
import * as THREE from 'three'
import BlasterScene from './BlasterScene'
const width = window.innerWidth
const height = window.innerHeight

const renderer = new THREE.WebGLRenderer({
  canvas: document.getElementById('app') as HTMLCanvasElement
})
renderer.setSize(width, height)

const mainCamera = new THREE.PerspectiveCamera(60, width / height, 0.1, 100)

const scene = new BlasterScene(mainCamera)
scene.initialise()

function tick() {
  scene.update()
  renderer.render(scene, mainCamera)
  requestAnimationFrame(tick)
}

tick()


renderer.render(scene, mainCamera)